#!/user/bin/env python3
# -*- coding: utf-8 -*-
"""
--------------------------------------
    Author:     JiChao_Song
    Date  :     2022/2/22 16:27
    Desc  :
--------------------------------------
"""


class RequestCommonVo:

    def __init__(self, method: str, url: str, headers: dict = None, data: dict = None, json: dict = None,
                 params: dict = None):
        self.method = method
        self.url = url
        self.headers = headers
        self.data = data
        self.json = json
        self.params = params

    def createRequest(self):
        """
        构造请求
        :return:
        """

        return f"self.client.request(method = '{self.method}', " \
               f"url = '{self.url}', params = {self.params}, json = {self.json}, headers = {self.headers})"


if __name__ == '__main__':
    print(RequestCommonVo(method = 'POST', url = '/user/path', json = {'name': 'test'}).createRequest())